﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Edit.aspx.cs" Inherits="admin_Info_List"
    EnableEventValidation="false" ValidateRequest="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .mypanel
        {
            text-align: center;
        }
    </style>
    <link rel="stylesheet" href="/ueditor/themes/default/css/ueditor.min.css" />
    <script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/ueditor/ueditor.all.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
    <script type="text/javascript" charset="utf-8" src="/ueditor/lang/zh-cn/zh-cn.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <f:PageManager ID="PageManager1" runat="server" EnableAjax="false" />
    <f:ContentPanel ID="ContentPanel1" runat="server" BodyPadding="5px" BoxFlex="1" EnableCollapse="true"
        ShowBorder="true" ShowHeader="false" Title="页面内容">
        <script type="text/plain" name="Editor1" id="Editor1"><%= ContextString %></script>
    </f:ContentPanel>
    <br />
    <f:Button ID="Button2" runat="server" CssClass="marginr" Text="提交" OnClick="btnSubmit_Click">
    </f:Button>
    </form>
    <script type="text/javascript">

        var containerClientID = '<%= ContentPanel1.ClientID %>';

        var domUtils = UE.dom.domUtils;
        var editor;
        F.ready(function () {
            // 初始化
            editor = UE.getEditor('Editor1', {
                initialFrameWidth: '100%',
                initialFrameHeight: 280,
                allowDivTransToP: false,
                autoHeightEnabled: false,
                autoFloatEnabled: false,
                focus: true,
                serverUrl: "/controller.ashx",
                imageUrl: "/controller.ashx",             //图片上传提交地址
                imagePath: "/controller.ashx",
                catchRemoteImageEnable: false,
                // ,catcherUrl:ServerUrl +"getRemoteImage.php"   //处理远程图片抓取的地址
                // ,catcherPath:ServerUrl                  //图片修正地址，同imagePath
                imageManagerUrl: "/controller.aspx",       //图片在线管理的处理地址
                shortcutMenu: ["fontfamily", "fontsize", "bold", "italic", "underline", "forecolor", "backcolor", "insertorderedlist", "insertunorderedlist"],
                onready: function () {
                    // 重新布局外部容器
                    F(containerClientID).updateLayout();
                },
                serialize: {
                    //白名单，编辑器会根据此配置保留对应标签下的对应标签或者属性 
                    whiteList: {
                        'span': { '$': {} }
                    }
                }
            });
        });

        // 更新编辑器内容
        function updateEditor(content) {
            if (editor && editor.isReady) {
                editor.setContent(content);
            }
        }
    </script>
</body>
</html>
